package com.springcloud.auth.feign;

import com.springcloud.commom.api.R;
import com.springcloud.commom.constant.AppConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 鉴权服务feign
 */
@FeignClient(value = AppConstant.AUTH_SERVICE_NAME, fallback = AuthClientFallback.class)
public interface IAuthClient {

    String API_PREFIX = "/auth";

    /**
     * 获取账号
     * @param accessToken
     * @return
     */
    @PostMapping(API_PREFIX + "/getAccount")
    R<Map<String, String>> getAccount(@RequestParam("accessToken") String accessToken);

}
